<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
        <div>{{msg}}</div>
        <div>{{count}}</div>
        <div v-text="msg"></div>
        <input type="text" v-model="msg">
        <input type="number" v-on:change="countChange" v-model="count">

    <div v-html="htmlContent"></div>
    <button v-on:click="btnClick('456', '789')">v-on点击事件</button>
</div>
<script src="./js/dep.js"></script>
<script src="./js/watcher.js"></script>
<script src="./js/compiler.js"></script>
<script src="./js/observer.js"></script>
<script src="./js/vue.js"></script>
<script>
    const vm = new Vue({
        el: '#app',
        data: {
            msg: 'Hello Vue',
            count: 10,
            person: {
                name: 'SeaChan'
            },
            htmlContent: `<h1 style="color: darkred">我是v-html指令插入</h1>`
        },
        methods: {
            btnClick(a, b) {
                this.htmlContent = `<h1 style="color: #39f">v-on点击事件改变后</h1>`
            },
            countChange() {
                console.log('v-on:change事件：', this.count)
            }
        }
    })

    console.log(vm.msg)
</script>
</body>
</html>
